package top.superflow.log

import org.slf4j.{Marker, Logger => Slf4jLogger}
import top.superflow.exception.RequestUnsupportedException

class Logger (slf4jLogger :Slf4jLogger) {

  if(slf4jLogger == null){
    throw new RequestUnsupportedException("The original slf4j logger should not be null.")
  }

  def info(msg: String): Unit = {
    slf4jLogger.info(msg)
  }

  def info(format: String, arg: scala.Any): Unit = {
    slf4jLogger.info(format, arg)
  }

  def info(format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.info(format, arguments:_*)
  }

  def info(msg: String, t: Throwable): Unit = {
    slf4jLogger.info(msg, t)
  }

  def info(marker: Marker, msg: String): Unit = {
    slf4jLogger.info(marker, msg)
  }

  def info(marker: Marker, format: String, arg: scala.Any): Unit = {
    slf4jLogger.info(marker, format, arg)
  }

  def info(marker: Marker, format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.info(marker, format, arguments:_*)
  }

  def info(marker: Marker, msg: String, t: Throwable): Unit = {
    slf4jLogger.info(marker, msg, t)
  }

  def warn(msg: String): Unit = {
    slf4jLogger.warn(msg)
  }

  def warn(format: String, arg: scala.Any): Unit = {
    slf4jLogger.warn(format, arg)
  }

  def warn(format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.warn(format, arguments:_*)
  }

  def warn(msg: String, t: Throwable): Unit = {
    slf4jLogger.warn(msg, t)
  }

  def warn(marker: Marker, msg: String): Unit = {
    slf4jLogger.warn(marker, msg)
  }

  def warn(marker: Marker, format: String, arg: scala.Any): Unit = {
    slf4jLogger.warn(marker, format, arg)
  }

  def warn(marker: Marker, format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.warn(marker, format, arguments:_*)
  }

  def warn(marker: Marker, msg: String, t: Throwable): Unit = {
    slf4jLogger.warn(marker, msg, t)
  }

  def error(msg: String): Unit = {
    slf4jLogger.error(msg)
  }

  def error(format: String, arg: scala.Any): Unit = {
    slf4jLogger.error(format, arg)
  }

  def error(format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.error(format, arguments:_*)
  }

  def error(msg: String, t: Throwable): Unit = {
    slf4jLogger.error(msg, t)
  }

  def error(marker: Marker, msg: String): Unit = {
    slf4jLogger.error(marker, msg)
  }

  def error(marker: Marker, format: String, arg: scala.Any): Unit = {
    slf4jLogger.error(marker, format, arg)
  }

  def error(marker: Marker, format: String, arguments: AnyRef*): Unit = {
    slf4jLogger.error(marker, format, arguments:_*)
  }

  def error(marker: Marker, msg: String, t: Throwable): Unit = {
    slf4jLogger.error(marker, msg, t)
  }
}
